home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / MiniGL / src / kprintf.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-11  |  559 b   |  30 lines

  1. /*
  2. ** This is a replacement for the amiga.lib kprintf for PowerPC.
  3. ** It uses the WarpUp SPrintF function to do debug output
  4. ** to the serial connector (or Sushi, if it's installed).
  5. */
  6.  
  7. #include <proto/exec.h>
  8. #ifdef __STORM__
  9. #include <clib/powerpc_protos.h>
  10. #else
  11. #include <powerpc/powerpc_protos.h>
  12. #endif
  13. #include <stdarg.h>
  14.  
  15. int kprintf(char *format, ...)
  16. {
  17.  
  18.     char msg[1024];
  19.     va_list marker;
  20.  
  21.     va_start(marker, format);
  22.     vsprintf(msg, format, marker);
  23.     va_end(marker);
  24.  
  25. #ifndef __STORM__
  26.     SPrintF(msg, 0);
  27. #endif
  28.     return 1;   /* fake something... */
  29. }
  30.